Skip to content

chore: update Go version to 1.26.1#4052

Merged
olegsu merged 4 commits intomainfrom
chore/update-go-1.26.1
Mar 18, 2026
Merged

chore: update Go version to 1.26.1#4052
olegsu merged 4 commits intomainfrom
chore/update-go-1.26.1

Conversation

@olegsu
Copy link
Collaborator

@olegsu olegsu commented Mar 17, 2026

Summary

  • Update Go toolchain version to 1.26.1 across the project
  • Upgrade golangci-lint from 2.4.0 to 2.11.3 (required — 2.4.0 was built with Go 1.25 and can't lint Go 1.26.1 code)
  • Disable newly introduced revive rules that flag pre-existing code patterns
  • Fix 3 prealloc issues by preallocating slices with known capacity

Changes

Go version bump

File From To
.go-version 1.25.5 1.26.1
go.mod 1.25.5 1.26.1
scripts/update_assets_md/go.mod 1.24.0 1.26.1
docs/version.asciidoc 1.25.4 1.26.1
bin/.go-1.25.5.pkg renamed bin/.go-1.26.1.pkg
bin/go .go-1.25.5.pkg .go-1.26.1.pkg
bin/gofmt .go-1.25.5.pkg .go-1.26.1.pkg

golangci-lint upgrade

File From To
bin/.golangci-lint-2.4.0.pkg renamed bin/.golangci-lint-2.11.3.pkg
bin/golangci-lint .golangci-lint-2.4.0.pkg .golangci-lint-2.11.3.pkg
.golangci.yaml Disable 6 new revive rules

Prealloc fixes

  • internal/resources/fetching/fetchers/azure/assets_enricher.go
  • internal/resources/providers/awslib/rds/provider.go
  • internal/resources/providers/gcplib/inventory/provider.go

Test plan

  • CI pipeline passes with the new Go version
  • Linter passes (golangci-lint run exits 0)
  • Build and unit tests succeed

@olegsu olegsu requested a review from a team as a code owner March 17, 2026 19:55
Update Go toolchain version across the project:
- .go-version: 1.25.5 -> 1.26.1
- go.mod: 1.25.5 -> 1.26.1
- scripts/update_assets_md/go.mod: 1.24.0 -> 1.26.1
- docs/version.asciidoc: 1.25.4 -> 1.26.1
- Rename Hermit package bin/.go-1.25.5.pkg -> bin/.go-1.26.1.pkg
@olegsu olegsu force-pushed the chore/update-go-1.26.1 branch from fa8f318 to c7c1ece Compare March 17, 2026 20:33
olegsu added 3 commits March 17, 2026 15:50
golangci-lint 2.4.0 was built with Go 1.25 and refuses to lint Go 1.26.1
target code. Upgrade to 2.11.3 (built with Go 1.26.1) and address new
lint findings:
- Disable newly introduced revive rules that flag pre-existing code
  patterns (package-directory-mismatch, enforce-switch-style,
  use-waitgroup-go, use-slices-sort, identical-switch-branches,
  package-naming)
- Fix 3 prealloc issues by preallocating slices with known capacity
@mergify mergify bot assigned olegsu Mar 17, 2026
@mergify
Copy link

mergify bot commented Mar 17, 2026

This pull request does not have a backport label. Could you fix it @olegsu? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

Copy link
Member

@kubasobon kubasobon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@olegsu olegsu merged commit 535c223 into main Mar 18, 2026
10 checks passed
@olegsu olegsu deleted the chore/update-go-1.26.1 branch March 18, 2026 14:33
@github-actions
Copy link

@Mergifyio backport 8.19 9.2 9.3

@mergify
Copy link

mergify bot commented Mar 18, 2026

backport 8.19 9.2 9.3

✅ Backports have been created

Details

Cherry-pick of 535c223 has failed:

On branch mergify/bp/8.19/pr-4052
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit 535c223c.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .go-version
	modified:   .golangci.yaml
	renamed:    bin/.go-1.25.5.pkg -> bin/.go-1.26.1.pkg
	modified:   bin/go
	modified:   bin/gofmt
	modified:   go.mod

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	added by them:   bin/.golangci-lint-2.11.3.pkg
	both deleted:    bin/.golangci-lint-2.4.0.pkg
	added by us:     bin/.golangci-lint-2.9.0.pkg
	both modified:   bin/golangci-lint
	both modified:   docs/version.asciidoc
	both modified:   scripts/update_assets_md/go.mod

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Cherry-pick of 535c223 has failed:

On branch mergify/bp/9.2/pr-4052
Your branch is up to date with 'origin/9.2'.

You are currently cherry-picking commit 535c223c.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .go-version
	modified:   .golangci.yaml
	renamed:    bin/.go-1.25.5.pkg -> bin/.go-1.26.1.pkg
	renamed:    bin/.golangci-lint-2.4.0.pkg -> bin/.golangci-lint-2.11.3.pkg
	modified:   bin/go
	modified:   bin/gofmt
	modified:   bin/golangci-lint
	modified:   docs/version.asciidoc
	modified:   go.mod
	modified:   internal/resources/fetching/fetchers/azure/assets_enricher.go
	modified:   internal/resources/providers/awslib/rds/provider.go
	modified:   internal/resources/providers/gcplib/inventory/provider.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   scripts/update_assets_md/go.mod

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify bot pushed a commit that referenced this pull request Mar 18, 2026
## Summary
- Update Go toolchain version to 1.26.1 across the project
- Upgrade golangci-lint from 2.4.0 to 2.11.3 (required — 2.4.0 was built
with Go 1.25 and can't lint Go 1.26.1 code)
- Disable newly introduced revive rules that flag pre-existing code
patterns
- Fix 3 prealloc issues by preallocating slices with known capacity

## Changes

### Go version bump
| File | From | To |
|------|------|----|
| `.go-version` | 1.25.5 | 1.26.1 |
| `go.mod` | 1.25.5 | 1.26.1 |
| `scripts/update_assets_md/go.mod` | 1.24.0 | 1.26.1 |
| `docs/version.asciidoc` | 1.25.4 | 1.26.1 |
| `bin/.go-1.25.5.pkg` | renamed | `bin/.go-1.26.1.pkg` |
| `bin/go` | `.go-1.25.5.pkg` | `.go-1.26.1.pkg` |
| `bin/gofmt` | `.go-1.25.5.pkg` | `.go-1.26.1.pkg` |

### golangci-lint upgrade
| File | From | To |
|------|------|----|
| `bin/.golangci-lint-2.4.0.pkg` | renamed |
`bin/.golangci-lint-2.11.3.pkg` |
| `bin/golangci-lint` | `.golangci-lint-2.4.0.pkg` |
`.golangci-lint-2.11.3.pkg` |
| `.golangci.yaml` | — | Disable 6 new revive rules |

### Prealloc fixes
- `internal/resources/fetching/fetchers/azure/assets_enricher.go`
- `internal/resources/providers/awslib/rds/provider.go`
- `internal/resources/providers/gcplib/inventory/provider.go`

## Test plan
- [ ] CI pipeline passes with the new Go version
- [ ] Linter passes (`golangci-lint run` exits 0)
- [ ] Build and unit tests succeed

(cherry picked from commit 535c223)

# Conflicts:
#	bin/.golangci-lint-2.11.3.pkg
#	bin/.golangci-lint-2.4.0.pkg
#	bin/.golangci-lint-2.9.0.pkg
#	bin/golangci-lint
#	docs/version.asciidoc
#	scripts/update_assets_md/go.mod
mergify bot pushed a commit that referenced this pull request Mar 18, 2026
## Summary
- Update Go toolchain version to 1.26.1 across the project
- Upgrade golangci-lint from 2.4.0 to 2.11.3 (required — 2.4.0 was built
with Go 1.25 and can't lint Go 1.26.1 code)
- Disable newly introduced revive rules that flag pre-existing code
patterns
- Fix 3 prealloc issues by preallocating slices with known capacity

## Changes

### Go version bump
| File | From | To |
|------|------|----|
| `.go-version` | 1.25.5 | 1.26.1 |
| `go.mod` | 1.25.5 | 1.26.1 |
| `scripts/update_assets_md/go.mod` | 1.24.0 | 1.26.1 |
| `docs/version.asciidoc` | 1.25.4 | 1.26.1 |
| `bin/.go-1.25.5.pkg` | renamed | `bin/.go-1.26.1.pkg` |
| `bin/go` | `.go-1.25.5.pkg` | `.go-1.26.1.pkg` |
| `bin/gofmt` | `.go-1.25.5.pkg` | `.go-1.26.1.pkg` |

### golangci-lint upgrade
| File | From | To |
|------|------|----|
| `bin/.golangci-lint-2.4.0.pkg` | renamed |
`bin/.golangci-lint-2.11.3.pkg` |
| `bin/golangci-lint` | `.golangci-lint-2.4.0.pkg` |
`.golangci-lint-2.11.3.pkg` |
| `.golangci.yaml` | — | Disable 6 new revive rules |

### Prealloc fixes
- `internal/resources/fetching/fetchers/azure/assets_enricher.go`
- `internal/resources/providers/awslib/rds/provider.go`
- `internal/resources/providers/gcplib/inventory/provider.go`

## Test plan
- [ ] CI pipeline passes with the new Go version
- [ ] Linter passes (`golangci-lint run` exits 0)
- [ ] Build and unit tests succeed

(cherry picked from commit 535c223)

# Conflicts:
#	scripts/update_assets_md/go.mod
mergify bot pushed a commit that referenced this pull request Mar 18, 2026
## Summary
- Update Go toolchain version to 1.26.1 across the project
- Upgrade golangci-lint from 2.4.0 to 2.11.3 (required — 2.4.0 was built
with Go 1.25 and can't lint Go 1.26.1 code)
- Disable newly introduced revive rules that flag pre-existing code
patterns
- Fix 3 prealloc issues by preallocating slices with known capacity

## Changes

### Go version bump
| File | From | To |
|------|------|----|
| `.go-version` | 1.25.5 | 1.26.1 |
| `go.mod` | 1.25.5 | 1.26.1 |
| `scripts/update_assets_md/go.mod` | 1.24.0 | 1.26.1 |
| `docs/version.asciidoc` | 1.25.4 | 1.26.1 |
| `bin/.go-1.25.5.pkg` | renamed | `bin/.go-1.26.1.pkg` |
| `bin/go` | `.go-1.25.5.pkg` | `.go-1.26.1.pkg` |
| `bin/gofmt` | `.go-1.25.5.pkg` | `.go-1.26.1.pkg` |

### golangci-lint upgrade
| File | From | To |
|------|------|----|
| `bin/.golangci-lint-2.4.0.pkg` | renamed |
`bin/.golangci-lint-2.11.3.pkg` |
| `bin/golangci-lint` | `.golangci-lint-2.4.0.pkg` |
`.golangci-lint-2.11.3.pkg` |
| `.golangci.yaml` | — | Disable 6 new revive rules |

### Prealloc fixes
- `internal/resources/fetching/fetchers/azure/assets_enricher.go`
- `internal/resources/providers/awslib/rds/provider.go`
- `internal/resources/providers/gcplib/inventory/provider.go`

## Test plan
- [ ] CI pipeline passes with the new Go version
- [ ] Linter passes (`golangci-lint run` exits 0)
- [ ] Build and unit tests succeed

(cherry picked from commit 535c223)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants